UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'nYLpidnuGwlzIZuhFUIP/QI4cfAVWd0xxhveRDM7hJg=' 
WHERE 
  key_id = '5ef1dca4b8cffef7e5bcb424f80aee063fecb50f5b31d0c8d11a760fb5b26ba5' 
  AND (
    token = 'nYLpidnuGwlzIZuhFUIP/QI4cfAVWd0xxhveRDM7hJg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031