UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/IHcah0L9jLkuzJIH1BP/RUr+LZPyp3vqVXGLQ6eWt8='
WHERE
key_id = '5461c81453d6a580080c01d20eaf2b703ff349f9b4bad704b0ac914dbc3394a6'
AND (
token = '/IHcah0L9jLkuzJIH1BP/RUr+LZPyp3vqVXGLQ6eWt8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)