UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zE4DYnhdosgcx7gjdFt3v3wsO5nuQrzJ9b8Vp5iKrXo='
WHERE
key_id = '11c4c8b5b026ff5ba7ab465cc3b2e9bc61689e5c287a55673f19f3a1d8d0dce8'
AND (
token = 'zE4DYnhdosgcx7gjdFt3v3wsO5nuQrzJ9b8Vp5iKrXo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)