UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'dvPrJlw3poWPrO/Tf6toypqJFKRkP5l9okbGSmxU3Ro='
WHERE
key_id = '151ea6c0edbe233d59699a14281ae1d746d4ef2d6a7ac30b597630d7d7f0092d'
AND (
token = 'dvPrJlw3poWPrO/Tf6toypqJFKRkP5l9okbGSmxU3Ro='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)