UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+LEfSPCZ1sjQKmvnrWEC2o7t9gWQXh51eS7ZxgoFu6k='
WHERE
key_id = 'e22b56e68169b09a6c8a31160231ccab3d83e7c7d6fd3c127ada6e9d64851556'
AND (
token = '+LEfSPCZ1sjQKmvnrWEC2o7t9gWQXh51eS7ZxgoFu6k='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)