UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rODDgk6lSq2gGUwzuQrrhaPxG8XxZ+AhFtWBP6bfL4A='
WHERE
key_id = '6b6aff0a13de61af38e226170437232802c5f7a4e73c9ad0172d12eac2197dcd'
AND (
token = 'rODDgk6lSq2gGUwzuQrrhaPxG8XxZ+AhFtWBP6bfL4A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)