UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'F8GkIM9kfl/gO0t+tIbyeAPrwB2MBJwP3HO2aZvSyfo='
WHERE
key_id = '6af12105a6e62246cb2e26095bc109576a0d57287eeefed6f021c49034c30f74'
AND (
token = 'F8GkIM9kfl/gO0t+tIbyeAPrwB2MBJwP3HO2aZvSyfo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)