UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jBetrjnVtq821astyZY62/NcMYYcSQ8heTzEFfjKDzw='
WHERE
key_id = '75d3061729c55547a3b259da327c473be291c48e445fce6a4cf1f1f76643e44f'
AND (
token = 'jBetrjnVtq821astyZY62/NcMYYcSQ8heTzEFfjKDzw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)