UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1cFhBJalySV/fzXEeOCTDueISzyJhNal5iWtbXAqv4s='
WHERE
key_id = '60a55618604fcdbcdb6bf8e928c60208d98add438ef5d8b9cd3ded8076c6cfdd'
AND (
token = '1cFhBJalySV/fzXEeOCTDueISzyJhNal5iWtbXAqv4s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)