UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FC6dRNNz5sAas3KiFefLEp5mNqmh9NTPekootTiMuXk='
WHERE
key_id = '720f8e0482b502c180a827a9b3cd7de3735660713369f0ff801dfbc409d5e6e7'
AND (
token = 'FC6dRNNz5sAas3KiFefLEp5mNqmh9NTPekootTiMuXk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)