UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+TbcK60cnK5NRaYzgptck/TPZIn3VJUXlWbr0Q5BArE='
WHERE
key_id = '54d85ff42307de07b3fd330657795e1a966eb7bc4e2841dfbb84ee2b1f3e774d'
AND (
token = '+TbcK60cnK5NRaYzgptck/TPZIn3VJUXlWbr0Q5BArE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)