UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ZsTXO7tlYGeIZ1Zcb1wbxNiSQPCiw6Zpp28I5njcsFc='
WHERE
key_id = '88bafb0bce16b05ad628acef9d9eff6f55ab6a5c0ba5aa6398de1c215c7550b5'
AND (
token = 'ZsTXO7tlYGeIZ1Zcb1wbxNiSQPCiw6Zpp28I5njcsFc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)