UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/ex0mBkn1a+J+Cuzfk/EvHedJi6Qm+uxccJ3ySUQS48='
WHERE
key_id = 'cb1252e6142ac4e5b5a417774ef932689129b3b673984d9bf96a29e856e5f1ad'
AND (
token = '/ex0mBkn1a+J+Cuzfk/EvHedJi6Qm+uxccJ3ySUQS48='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)