UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '3Qv0nRRxPxs8wxaXz7RL0BKgwsVN68s5mP/53QHZJp8=' 
WHERE 
  key_id = '2f00a7747c32be427f59c63a5ae35da6e7e30cde48aa2f8264340b7a5052fafe' 
  AND (
    token = '3Qv0nRRxPxs8wxaXz7RL0BKgwsVN68s5mP/53QHZJp8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00055