UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '8T4X4VPch2/iNXb+V6XAHFuodP5BktTBL7su9KcqJXY='
WHERE
key_id = 'bc461a6581cd472d1c8ee629b3dbb8d644e27793fac02345af70afe86cc8d009'
AND (
token = '8T4X4VPch2/iNXb+V6XAHFuodP5BktTBL7su9KcqJXY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)