UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Lfm19+JyrtmXihnUEpBB9ZlNfCy0lGhuumj609Xb2BE='
WHERE
key_id = 'f80bffce19e5ecc924360e86347961f151673c45607b11e4ad74c8cabc2c2aab'
AND (
token = 'Lfm19+JyrtmXihnUEpBB9ZlNfCy0lGhuumj609Xb2BE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)