UPDATE
cscart_june_setuplock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'r8C+4DgqjBzO04VnPuCAGuJOeLq4roClXfYGuSgHW58='
WHERE
key_id = 'b5809e09cc16f0cf5684ebdec591b3dbcd1b9104e967b94a9fdbac307413c3e9'
AND (
token = 'r8C+4DgqjBzO04VnPuCAGuJOeLq4roClXfYGuSgHW58='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)