UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2cmvgyGZhFOn5T7sYcsTKApqosfE34ziTubaGjF2As8='
WHERE
key_id = '0dbc5a41c46b9a4fab9bcd75fdb98779aba04fb9a1298e327cf7908b568c6e8d'
AND (
token = '2cmvgyGZhFOn5T7sYcsTKApqosfE34ziTubaGjF2As8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)