UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'aRcwZWUwJ4OyhMHlAreEqqODKQqbwXuGTILZb/qBIQQ='
WHERE
key_id = '00146ad37ef7c771d7aaf4d8a93fbd7a381c0e862ad036c14b8620f28c1ff1ef'
AND (
token = 'aRcwZWUwJ4OyhMHlAreEqqODKQqbwXuGTILZb/qBIQQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)