UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'iquu0xb24EffdSGWMoWTfyjcJp4dsbK7NoiWfWQvqQ8='
WHERE
key_id = '86ac90ca6820682ded3a6d2125bc782cf15b0a6ad6dfbd337f84a9426bd25f76'
AND (
token = 'iquu0xb24EffdSGWMoWTfyjcJp4dsbK7NoiWfWQvqQ8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)