UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zCYQEUH3ECb4LM1/9ojuMobtKga1gnsyovkAC5Zc04c='
WHERE
key_id = '9c8dc51180b93e027e70faca92e48ab04a789892bc5e3c9105268d48f93887ea'
AND (
token = 'zCYQEUH3ECb4LM1/9ojuMobtKga1gnsyovkAC5Zc04c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)