UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+h/+KkkBppEXQ/ooEYgxp3pT16PgtrPiJ6n6McimI1Y=' 
WHERE 
  key_id = '85b8b2743c25b2a5901e2d30011bdedea92f265d002de1db0bf8a92a40f0befc' 
  AND (
    token = '+h/+KkkBppEXQ/ooEYgxp3pT16PgtrPiJ6n6McimI1Y=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00039