UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Rqt2W44Vy/eXLyQ2R6iw3+X1ew/XWZwJ9nbDrZVrLck='
WHERE
key_id = '6ddbe498512e7d5fda778ffa4aaff52578a98f2a7f8b7bcd3f68bbe0282dc6f8'
AND (
token = 'Rqt2W44Vy/eXLyQ2R6iw3+X1ew/XWZwJ9nbDrZVrLck='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)