UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'R8uMMTZrj2IKZaHTZ8mFQhWMGyOy/Rhm2lizqc6uTQM='
WHERE
key_id = '6662b94ca391f6c188792f25ca761b1d2aea7d4542fdd6e018ea8bb3c1d1785d'
AND (
token = 'R8uMMTZrj2IKZaHTZ8mFQhWMGyOy/Rhm2lizqc6uTQM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)