UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'FmfBjSFUKq/wuZ3+M8gu52RyXDib35lCnwgFn9sXRBw=' 
WHERE 
  key_id = 'fa2c228bb5acd306c9f07c585ab3c8bc04ca5bf904e02f714532fc729ac46aa7' 
  AND (
    token = 'FmfBjSFUKq/wuZ3+M8gu52RyXDib35lCnwgFn9sXRBw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033