UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'E8nOWmOpGB1nt4r/YK9fqYULnjbIALzN2H+owhFCcOU='
WHERE
key_id = 'fe5ca6ecf4773f8a1a326048a14066f016801f5099209851c9d82ede337e29ba'
AND (
token = 'E8nOWmOpGB1nt4r/YK9fqYULnjbIALzN2H+owhFCcOU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)